package com.mxx.springaction.proxy.staticProxy;

public class StudentProxy implements Person {
    private Student student;

    public StudentProxy(Person person) {
        if (person.getClass() == Student.class)
            this.student = (Student) person;
    }

    @Override
    public void giveWork() {
        System.out.println("这个同学交的慢。。。");
        student.giveWork();
    }
}
